package cts;

import java.awt.Frame;
import javax.swing.JPanel;

import java.awt.Color;
import java.awt.GridBagLayout;
import java.awt.BorderLayout;
import java.util.Random;
import java.util.Vector;
import java.util.concurrent.ExecutionException;
import java.awt.Rectangle;
import javax.swing.BorderFactory;
import java.awt.SystemColor;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.ScrollPaneConstants;

import java.awt.Dimension;
import java.awt.peer.WindowPeer;

import javax.swing.JScrollPane;

import done.EnergyScale;
import done.GasScale;
import done.Information;
import done.PresenceViewer;
import done.TemperatureScale;
import done.WaterScale;
import done.WindowViewer;

import javax.swing.border.BevelBorder;

public class labelspeed extends Frame {

	private static final long serialVersionUID = 1L;
	private JPanel jPanel = null;
	private JButton eee = null;
	private JScrollPane jScrollPane = null;
	private JPanel P1 = null;
	private JLabel windowOpen;
	/**
	 * This is the default constructor
	 */
	public labelspeed() {
		super();
		initialize();

	}
	
	public void fill()
	{

	PresenceViewer ts;
	ts=new PresenceViewer();
	ts.setPanel(P1);
	ts.execute();
	for(int i=0;i<10;i++){

			ts.writeNext(new Information(i , i));	
	}
	for(int i=0;i<10;i++){

		ts.writeNext(new Information(i , i));	
	}
	ts.finished();
	
	


		
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(893, 142);
		this.setTitle("Frame");

		this.add(getJPanel(), BorderLayout.CENTER);

		fill();
	}

	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jPanel = new JPanel();
			jPanel.setLayout(null);
			jPanel.add(getEee(), null);
			jPanel.add(getJScrollPane(), null);
		}
		return jPanel;
	}

	/**
	 * This method initializes eee	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getEee() {
		if (eee == null) {
			eee = new JButton();
			eee.setBounds(new Rectangle(655, 257, 100, 26));
		}
		return eee;
	}

	/**
	 * This method initializes jScrollPane	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane() {
		if (jScrollPane == null) {
			jScrollPane = new JScrollPane();
			jScrollPane.setBounds(new Rectangle(20, 10, 800,50));
			jScrollPane.setViewportView(getP1());
			jScrollPane.setBorder(BorderFactory.createEmptyBorder());
			jScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
			
		}
		return jScrollPane;
	}

	/**
	 * This method initializes P1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getP1() {
		if (P1 == null) {
	
			P1 = new JPanel();
			P1.setLayout(null);
			P1.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED), BorderFactory.createBevelBorder(BevelBorder.RAISED)));
		}
		return P1;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
